home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!gate.demon.co.uk
- From: "Paul F. Robinson" <pfr@doodey.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: command line argument help
- Date: Sun, 28 Jan 96 14:43:51 GMT
- Organization: Private node
- Message-ID: <9601281443.AA0001h@doodey.demon.co.uk>
- References: <4edfth$ok@muss.CIS.McMaster.CA>
- X-NNTP-Posting-Host: gate.demon.co.uk
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
- X-Mail2News-Path: relay-1.mail.demon.net!gate.demon.co.uk
-
- shadowfax wrote:
- : i am not having too much success with command line arguments. i am
- [snip]
- :
- : int main(char *argv[])
- : {
- [snip]
- :
- : when i compile and run, it always outputs an anser of 0. can anyone tell
- : me what's wrong?
-
- If you want to use argv, your main() function should start
-
- int main(int argc, char *argv[])
- {
-
- even if you don't want to use argc.
- See K&R 2nd ed. chapter 5.10
-
- Paul.
-